#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project ：api_automation_test 
@File    ：path_dir.py
@IDE     ：PyCharm 
@Author  ：XiaoDengYa
@Date    ：2021/7/22/022 9:28 
"""

import os


def root_dir_path():
    return os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))


def get_subdirectory_path(name):
    return os.path.join(root_dir_path(), name)


def get_optput_path(time_str):
    optput_path = get_subdirectory_path("output")
    if not os.path.exists(optput_path):
        os.mkdir(optput_path)
    file_path = os.path.join(os.path.join(optput_path, time_str))
    return file_path

